package io.renren.modules.store.service.impl;

import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.renren.common.utils.PageUtils;
import io.renren.common.utils.Query;

import io.renren.modules.store.dao.TStoreWarehouseDao;
import io.renren.modules.store.entity.TStoreWarehouseEntity;
import io.renren.modules.store.service.TStoreWarehouseService;


@Service("tStoreWarehouseService")
public class TStoreWarehouseServiceImpl extends ServiceImpl<TStoreWarehouseDao, TStoreWarehouseEntity> implements TStoreWarehouseService {

    @Override
    public PageUtils queryPage(Map<String, Object> params) {
        IPage<TStoreWarehouseEntity> page = this.page(
                new Query<TStoreWarehouseEntity>().getPage(params),
                new QueryWrapper<TStoreWarehouseEntity>()
                        .eq(!params.get("sellerId").equals(""),"seller_id",params.get("sellerId"))
        );

        return new PageUtils(page);
    }

}